cmake_minimum_required(VERSION 3.20)

project(juge_os_compiler LANGUAGES CXX)

if(WIN32)
    message(STATUS "Platform: WIN32")
    if(MINGW)
        message(STATUS "Compiler: MINGW")
    elseif(MSVC)
        message(STATUS "Compiler: MSVC ${MSVC_VERSION}")
    endif()
elseif(LINUX)
    message(STATUS "Platform: LINUX")
endif()

message(STATUS "Compiler: ${CMAKE_CXX_COMPILER}")
message(STATUS "Compiler Version: ${CMAKE_CXX_COMPILER_VERSION}")

# 指定C C++编译器
# "-DCMAKE_C_COMPILER:FILEPATH=D:\Program Files\LLVM\bin\clang.exe"
# "-DCMAKE_CXX_COMPILER:FILEPATH=D:\Program Files\LLVM\bin\clang++.exe"